//
// Created by liushuai on 2021/2/14.
//

#include "getSum.h"
int getSum(int a, int b) {
<<<<<<< HEAD:cxx/algorithm/src/getSum.cc
    int bit_xor = a^b;
    int bit_and = static_cast<unsigned>((a&b))<<1;
    if(bit_and == 0)
        return bit_xor;
    else
        return getSum(bit_xor,bit_and);
=======
  int bit_xor = a ^ b;
  int bit_and = static_cast<unsigned>((a & b)) << 1;
  if (bit_and == 0)
    return bit_xor;
  else
    return getSum(bit_xor, bit_and);
>>>>>>> dev:cxx/algorithm/common/src/getSum.cc
}